export default function NotFound(props) {
    console.log("not", props);
    console.log(props.location.search);

    //将gquery参数转为对象
    function getQuery(params) {
        let query = {};
        params
            .slice(1)
            .split("&")
            .forEach((item) => {
                let queryItem = item.split("=");
                query[queryItem[0]] = queryItem[1];
            });
        return query;
    }

    return (
        <div>
            参数为：
            <h1>{getQuery(props.location.search).id}</h1>
            <h1>{getQuery(props.location.search).name}</h1>
        </div>
    );
}
